/**
 * 
 */
package com.wxq.weitool;

import java.nio.charset.StandardCharsets;
import java.util.Base64;

/**
 * @author West.W
 * create date 2018-02-06 15:56:38
 */

public class Base64s {

	
	public static String encode(String text) {
		return Base64.getEncoder().encodeToString(text.getBytes(StandardCharsets.UTF_8));
	}
	public static String decode(String text) {
		byte[] decode = Base64.getDecoder().decode(text);
		return new String(decode, StandardCharsets.UTF_8);
	}
}
